# -*- coding: utf-8 -*-
from Tkinter import *
import tkMessageBox
class TK(Frame):
    def __init__(self,parent,**args):
        if args.has_key('boss'):
            self.boss=args['boss']
            del args['boss']
        Frame.__init__(self,parent,args)
        self.configure(width=350,height=200,relief='raised',bd=3)
        self.parent=parent        
        self.Btn1=Button(self,text='Fermer l\'application',command=self.quit)
        self.Btn1.place(x=220,y=160)
        self.place(x=10,y=10)
        L=Label(self,text='Un menu vient d\'etre ajoute a la barre de menu')
        L.configure(width=55,relief='sunken',anchor=CENTER)
        L.place(x=2,y=4)
        self.boss.barreMenu.append(Menu(self.boss.menu, tearoff=0))
        self.boss.barreMenu[0].add_command(label="ERP", command=self.ERP)
        self.parent.title('Vue test telechargee depuis le serveur')
        pass
    
    def ERP(self):
        tkMessageBox.showinfo('ERP','La vue contient des composants visuels mais aussi des methodes')
        pass